package user.main;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import commonfunctions.Matrix;
import cplexconvert.Convert;

import fileparsing.ReadProbabilities;

public class RunConvertToCplex
{
	public static void main(String[] args)
	{
		try {
			System.out.println("What file will the weights be read from?");
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    	String dirName;
			dirName = br.readLine();
			Matrix weights = ReadProbabilities.probabilityMatrix(dirName);
			Convert.convertToFile(weights, dirName);
			System.out.println("Done");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
